Repository navigation
feat(review): AI evidence line, suggestions and base-branch repo instructions (needs core 0.10) - #1774
Draft
RaghwendraSingh wants to merge 3 commits into
Draft
feat(review): AI evidence line, suggestions and base-branch repo instructions (needs core 0.10)#1774RaghwendraSingh wants to merge 3 commits into
RaghwendraSingh wants to merge 3 commits into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
RaghwendraSingh
force-pushed
the
feat/review-ai-verifier
branch
from
November 20, 2026 06:54
8aba994 to
f3c5e86
Compare
RaghwendraSingh
force-pushed
the
feat/review-ai-remit
branch
from
November 20, 2026 06:54
be62a4d to
58b9300
Compare
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
…, suggestion and cites Newer cores return `evidence_line`, `pre_existing`, `suggestion` and `cites` on each AI finding. `aiOptionalFields` maps them onto the finding (`evidenceLine`, `preExisting`, `suggestion`, and a `(per \`<file>\`)` body suffix for `cites`). Each defaults to absent, so the lane works unchanged against the pinned core 0.9.0. A malformed suggestion is dropped rather than failing the finding's schema check. The existing pipeline already handles the rest: `anchorToDiff` only ever sets `preExisting`, so an AI-set flag survives anchoring, and AI suggestions pass through `validateSuggestions` before posting. Tests cover both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e base branch - `loadRepoInstructions` reads `REVIEW.md`, `.altimate/REVIEW.md`, `AGENTS.md` and `CLAUDE.md` at the repo root and at each ancestor directory of a changed path, from the BASE commit via `showAtRef`, so a PR cannot rewrite the instructions it is reviewed under. Each file is cut to 4,000 chars and the set to 12,000; the root comes first. - `run.ts` loads them only when the AI lane runs and a git base resolved; `OrchestrateInput.repoInstructions` carries them to `AiReviewInput`. - `buildUserMessage` adds a "REPO REVIEW INSTRUCTIONS" section per call, listing only files whose directory contains a file in that call, and asks the model to set `cites` when a finding relies on one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…umber When the AI reviewer returns `evidence_line` without `line`, the quoted text now goes into `evidence.result.line`, so `anchorByEvidence` places the finding on the matching diff line, as it does for rule findings. The logic lives in a small exported `aiEvidenceResult` helper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RaghwendraSingh
force-pushed
the
feat/review-ai-verifier
branch
from
November 20, 2026 08:22
f3c5e86 to
a74e400
Compare
RaghwendraSingh
force-pushed
the
feat/review-ai-remit
branch
from
November 20, 2026 08:23
58b9300 to
14b3d2c
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Part of #1792
Type of change
What does this PR do?
Draft, not for merge yet. Stacked on #1769. It needs the
@altimateai/altimate-corerelease that parses the new AI output fields (0.10.0, PR in the core repo). Against core 0.9.0 the new fields default and behaviour is unchanged.What changed
evidence_line,pre_existing,suggestionandcitesand maps them to the finding: quoted line, pre-existing tag, a GitHub suggestion block when valid, and(per <file>).REVIEW.md,.altimate/REVIEW.md,AGENTS.md,CLAUDE.mdat the root and above each changed path) are read from the base branch and given to the AI as conventions, so a PR can't change its own instructions. Capped at 4k chars per file and 12k in total.Results so far
How did you verify your code works?
bun test test/altimate/review: 678 pass.bunx tsc --noEmit: clean.Cost side effects
No new model calls, warehouse queries or cloud resources. When the AI lane is enabled, base-branch repo instructions add at most 12k characters (about 3k tokens) of input per AI call (4k per file), and the new output fields add a few output tokens per finding.
Screenshots / recordings
Not a UI change.
Checklist
🤖 Generated with Claude Code
Summary by cubic
Maps the AI reviewer's newer output fields onto findings and supplies the reviewer with the repo's own review instructions read from the base branch. Requires
altimate-core0.10.0; against 0.9.0 the new fields default to absent and behavior is unchanged.evidence_line,pre_existing,suggestionandcitesfrom the AI reviewer, mapping them to the finding's quoted line, pre-existing tag, GitHub suggestion block, and a(per <file>)body suffix; malformed suggestions are dropped, not fatal.REVIEW.md,.altimate/REVIEW.md,AGENTS.mdandCLAUDE.mdat the repo root and each ancestor directory of a changed path from the base commit, so a PR can't rewrite its own instructions; each file is capped at 4k chars, 12k total.Written for commit 14b3d2c. Summary will update on new commits.